/**
 * woon 20160722
 */
var deviceone = require("deviceone");
var nf = deviceone.sm("do_Notification");
var rootView = deviceone.ui("$");//当前页面根
var http = require("helper/http");
var guideCache = deviceone.sm("do_DataCache");


var guide1 = null;
//没有登陆--引导
module.exports.noLogin = function(){
	if(guide1==null){
		guide1 = rootView.add("guide1", "source://view/guide/nologin.ui", 0, 0);
	}else{
		deviceone.ui(guide1+".guideBg").show();
	}
	
}

var guide2 = null;
//没有消息--引导，只显示一次
module.exports.noMessage = function(){
	if(guideCache.hasData("guide_noMessage_is_show")){
		return;
	}
	guideCache.saveData("guide_noMessage_is_show","1");
	if(guide2==null){
		guide2 = rootView.add("guide2", "source://view/guide/nomessage.ui", 0, 0);
	}else{
		deviceone.ui(guide2+".guideBg").show();
	}
}

var guide3 = null;
//圈子主页--引导,只显示一次
module.exports.circleIndex = function(){
	if(guideCache.hasData("guide_circleIndex_is_show")){
		return;
	}
	guideCache.saveData("guide_circleIndex_is_show","1");
	if(guide3==null){
		guide3 = rootView.add("guide3", "source://view/guide/circleindex.ui", 0, 0);
	}else{
		deviceone.ui(guide3+".guideBg").show();
	}
}

var guide4 = null;
//没有圈子--引导
module.exports.noCircle = function(){
	if(guide4==null){
		guide4 = rootView.add("guide4", "source://view/guide/nocircle.ui", 0, 0);
	}else{
		deviceone.ui(guide4+".guideBg").show();
	} 
}

var guide5 = null;
//没有好友--引导,只显示一次
module.exports.noFriend = function(){
	if(guideCache.hasData("guide_noFriend_is_show")){
		return;
	}
	guideCache.saveData("guide_noFriend_is_show","1");
	if(guide5==null){
		guide5 = rootView.add("guide5", "source://view/guide/nofriend.ui", 0, 0);
	}else{
		deviceone.ui(guide5+".guideBg").show();
	}
}

var guide6 = null;
//没有圈子-新版--引导
module.exports.noCircle2 = function(){
	var x = 0,y = 0;
	if(guide6==null){
		if(arguments.length == 1){
			x = arguments[0];
		}else if(arguments.length == 2){
			x = arguments[0];
			y = arguments[1];
		}
		guide6 = rootView.add("guide6", "source://view/guide/nocircle2.ui", x, y);
	}else{
		deviceone.ui(guide6+".guideBg").show();
	} 
}